<template>
  <div>
    <!-- <svg>
            <use xlink:href="#icon-icadd2"></use>
          </svg> -->
    <div class="home">
      <div class="home-header">
        <div class="left">
          <span>
            <i class="iconfont icon-jiahao" @click="$router.push('/add')"></i>
          </span>
        </div>
        <router-link tag="div" to="/search" class="search">
          <div class="search-img">
            <i class="iconfont icon-sousuo"></i>
          </div>
          <input type="text" placeholder="最新菜谱" />
        </router-link>
        <div class="right">
          <router-link
            tag="i"
            to="/category"
            class="iconfont icon-fenlei"
          >
          </router-link>
          <router-link
            tag="i"
            to="/news"
            class="iconfont icon-lingdang"
          >
          </router-link>
        </div>
      </div>
      <div class="home-title">
        <ul>
          <router-link tag="li" to="/home/follow">
            <span>关注</span>
          </router-link>
          <router-link tag="li" to="/home/recommend">
            <span>推荐</span>
          </router-link>
          <router-link tag="li" to="/home/note">
            <span>笔记</span>
          </router-link>
          <router-link tag="li" to="/home/video">
            <span>视频</span>
          </router-link>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="less">
.home {
  width: 100%;
  height: 17%;
  background-color: #fff;
  position: fixed;
  top: 0;
  z-index: 99;
  .home-header {
    width: 100%;
    height: 47.6%;
    // margin: 0 15px;
    display: flex;
    .left {
      width: 8%;
      margin-left: 15px;
      span {
        width: 100%;
        height: 54%;
        margin: 10px 0;
        border-radius: 50%;
        background-color: #ffcc32;
        display: flex;
        justify-content: center;
        align-items: center;
        i {
          font-size: 26px;
        }
      }
    }
    .search {
      width: 58.6%;
      margin: 5px 0 5px 10px;
      border-radius: 5px;
      display: flex;
      .search-img {
        width: 13.6%;
        height: 40px;
        background-color: #f6f6f6;
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        position: relative;
        i {
          position: absolute;
          top: 12px;
          left: 10px;
          font-size: 15px;
          color: #969696;
        }
      }
      input {
        width: 86.4%;
        height: 40px;
        border: transparent;
        background-color: #f6f6f6;
        border-top-right-radius: 5px;
        border-bottom-left-radius: 5px;
      }
      input:focus {
        outline: none;
      }
    }
    .right {
      width: 26.6%;
      margin-top: 10px;
      i {
        font-size: 30px;
        margin: 10%;
      }
    }
  }
  .home-title {
    height: 60px;
    margin: 0 10px 10px;
    ul {
      display: flex;
      align-items: flex-end;
      li {
        margin: 15px 10px 10px;
        position: relative;
        span {
          font-size: 14px;
          color: #333;
        }
        &.router-link-active span {
          font-size: 22px;
          font-weight: 500;
        }
        &.router-link-active span::after {
          content: "";
          width: 25px;
          height: 5px;
          border: 1px solid #fcb339;
          background-color: #fcb339;
          border-radius: 10px;
          position: absolute;
          bottom: -10px;
          left: 0;
          right: 0;
          margin: auto;
        }
      }
    }
  }
}
</style>